home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / ucturbo2 / demotdy.c < prev    next >
Text File  |  1987-05-23  |  21KB  |  928 lines

  1. /*                               Demo.c
  2. *
  3. *    This program is designed to illustate some of the features contained
  4. *  in the Unicorn Library.  It uses the 16 color medium resolution mode of
  5. *  Tandy 1000 computer.  A second version of the library is available
  6. *  to be used with the 4 color medium resolution mode (mode 4) on the
  7. *  IBM-PC computer.
  8. *
  9. *    This program was written to test the Unicorn Library and to illustrate
  10. *  the use of the library functions.  Although it includes some art work
  11. *  please keep in mind that the author claims little or no artistic
  12. *  talent.  In spite of this, the program does illustrate how to call
  13. *  various functions contained in the library.
  14. *
  15. *    The library was originally developed to be used in a public school
  16. *  district in the development of software.  In addition it was used as
  17. *  a learning tool by the author.  The author has had no formal training
  18. *  in C or Assembler and was responsible for software development for
  19. *  the district.  The learning experience was worthwhile and the author
  20. *  feels that many others may also benefit by examining the source code.
  21. *
  22. *    This library is an upgraded version of an earlier release but
  23. `*  further improvements will occur in future releases.  This library
  24. *  now includes a paint command and many functions formally written in
  25. *  the C language have now been written in assembler to improve speed.
  26. *
  27. *    This program and library are both
  28. *                 Copyright (c) 1986 by David A. Miller
  29. *
  30. *  The right to use and give away both are hereby granted as long as the
  31. *  copyright notice is not removed from either, and the restrictions
  32. *  listed in the user agreement list elsewhere are followed.
  33. *
  34. *                           David A. Miller
  35. *                           8018 NE 123rd St.
  36. *                           Kirkland, WA  98034
  37. *                           (206) 823-4656
  38. *                           no collect calls please!
  39. *
  40. */
  41.  
  42.  
  43. #include "uc.h"
  44.  
  45.  
  46. main()
  47. {
  48.    int start = 9;   /*  define title start column  */
  49.  
  50.  
  51.    /* The following must be declared to return proper values */
  52.  
  53.    sm(9);
  54.    backclr(9);
  55.  
  56.    gothic('U',10,start+0,14);
  57.    gothic('n',10,start+25,14);
  58.    gothic('i',10,start+45, 14);
  59.    gothic('c',10,start+60, 14);
  60.    gothic('o',10,start+80,14);
  61.    gothic('r',10,start+100,14);
  62.    gothic('n',10,start+120,14);
  63.  
  64.    gothic('S',10,start+155,14);
  65.    gothic('o',10,start+175,14);
  66.    gothic('f',10,start+195,14);
  67.    gothic('t',10,start+210,14);
  68.    gothic('w',10,start+225,14);
  69.    gothic('a',10,start+245,14);
  70.    gothic('r',10,start+265,14);
  71.    gothic('e',10,start+285,14);
  72.  
  73.    raschar('P',50, start + 70, 2, 2, 11);
  74.    raschar('r',50, start + 90, 2, 2, 11);
  75.    raschar('e',50, start + 110, 2, 2, 11);
  76.    raschar('s',50, start + 130, 2, 2, 11);
  77.    raschar('e',50, start + 150, 2, 2, 11);
  78.    raschar('n',50, start + 170, 2, 2, 11);
  79.    raschar('t',50, start + 190, 2, 2, 11);
  80.    raschar('s',50, start + 210, 2, 2, 11);
  81.  
  82.    victory();
  83.  
  84. /* opening to 5th symphony */
  85. /*
  86.    soundon();  
  87.  
  88.    note(1,3,11,10);
  89.    delay(200);
  90.    note(1,3,11,0);
  91.    delay(50);
  92.  
  93.    note(1,3,11,10);
  94.    delay(200);
  95.    note(1,3,11,0);
  96.    delay(50);
  97.  
  98.    note(1,3,11,10);
  99.    delay(200);
  100.    note(1,3,11,0);
  101.    delay(50);
  102.  
  103.    note(1,3,7,10);
  104.    delay(1200);
  105.  
  106.    note(1,3,9,10);
  107.    delay(200);
  108.    note(1,3,9,0);
  109.    delay(50);
  110.  
  111.    note(1,3,9,10);
  112.    delay(200);
  113.    note(1,3,9,0);
  114.    delay(50);
  115.  
  116.    note(1,3,9,10);
  117.    delay(200);
  118.    note(1,3,9,0);
  119.    delay(50);
  120.  
  121.    note(1,3,6,10);
  122.    delay(1200);
  123.  
  124.  
  125.    setatten(1,15);
  126.    setatten(2,15);
  127.    setatten(3,15);
  128. */
  129.    unicorn();
  130.    atsay(24,3,8,0,"Copyright (c) 1986 David A. Miller");
  131.   
  132.  
  133.  
  134.    greenslv();
  135.  
  136.    cntue();
  137.    waitkey();
  138.    sm(9);       /* this resets the mode which in effect is a
  139.                    clear screen command.                      */
  140.    backclr(9);
  141.  
  142.    burble(200, 300);
  143.  
  144.    printf("\n\n\n\n\n A demonstration of Tandy-1000\n");
  145.    printf(" graphics using the 16 color medium\n");
  146.    printf(" resolution mode and the Unicorn\n");
  147.    printf(" library of functions.  This library\n");
  148.    printf(" uses the Lattice C large model.\n");
  149.    printf("   Not all library functions are \n");
  150.    printf(" illustrated in this demo.  The \n");
  151.    printf(" library is capable of many graphics\n");
  152.    printf(" concepts including points, lines, \n");
  153.    printf(" circles, ellipses (also rotated),\n");
  154.    printf(" and colorful print including \n");
  155.    printf(" different fonts.\n\n");
  156.    printf("    We hope you enjoy the demo\n");
  157.    printf("       and using the library!\n\n");
  158.    printf("   Copyright (C) 1986 David A. Miller\n");
  159.    atsay(24,10,8,0,"Press any key to continue");
  160.  
  161.    waitkey();
  162.    gliss(100, 1500, 3);
  163.  
  164.    sm(9);       /* this resets the mode which in effect is a
  165.                    clear screen command.                      */
  166.    backclr(14);
  167.  
  168.  
  169.  
  170.    pg1();
  171.    waitkey();
  172.    sm(9);
  173.    backclr(1);
  174.  
  175.  
  176.  
  177.    pg2();
  178.    cntue();
  179.    waitkey();
  180.    burble(300, 450);
  181.    sm(9);
  182.    backclr(1);
  183.  
  184.    pg3();
  185.    cntue();
  186.    waitkey();
  187.    sm(9);
  188.    backclr(9);
  189.  
  190.    atom();
  191.    redalert();
  192.    cntue();
  193.    waitkey();
  194.    sm(9);
  195.    backclr(1);
  196.  
  197.    printf("   The next screen will demonstrate\n\n\n");
  198.    printf("   T u r t l e    F u n c t i o n s");
  199.    printf("\n\n\n\n\n   The delay function is used to");
  200.    printf("\n   slow down the display of lines\n");
  201.    cntue();
  202.    burble(200, 350);
  203.    waitkey();
  204.    sm(9);
  205.    backclr(7);
  206.  
  207.    pg5();
  208.    cntue();
  209.    waitkey();
  210.    sm(9);
  211.    backclr(1);
  212.  
  213.    script('C',5,110,15);
  214.    script('o',5,126,14);
  215.    script('l',5,142,13);
  216.    script('o',5,158,12);
  217.    script('r',5,174,11);
  218.    script('s',5,190,10);
  219.  
  220.  
  221.    printf("\n\n\n\n   The following page illustrates\n");
  222.    printf("   the full 16 color color-set.\n");
  223.    printf("\n\n        Press any key to continue\n");
  224.    waitkey();
  225.  
  226.    pg6();
  227.    cntue();
  228.    waitkey();
  229.    gliss(1200, 400, 4);
  230.    sm(9);
  231.    backclr(9);
  232.  
  233.  
  234.    pg7();
  235.    cntue();
  236.    waitkey();
  237.    sm(9);
  238.    backclr(9);
  239.  
  240.  
  241.    pg8();
  242.    atsay(24,5,8,0,"Press any key to continue");
  243.    waitkey();
  244.    sm(9);
  245.    backclr(1);
  246.  
  247.  
  248.    pgf();
  249.    waitkey();
  250.    sm(3);
  251.    backclr(1);
  252.  
  253. }  /*  End of main program */
  254.  
  255.  
  256.  
  257. pg1()
  258. {
  259.    atsay(10,05,8,0, "The next page will demonstrate");
  260.    atsay(11,05,8,0, "some of the simple graphics");
  261.    atsay(12,05,8,0, "primitives including dots,");
  262.    atsay(13,05,8,0, "lines, filled boxes and");
  263.    atsay(14,05,8,0, "rectangles. ");
  264.    atsay(20,05,7,0, "Press any key to continue");
  265. }
  266.  
  267. pg2()
  268. {
  269.    int i;
  270.  
  271.    for(i=0; i <= 20; i++)
  272.       point(20, 10+i*2,i % 16);
  273.    box(50,20,80,50,15);
  274.    boxfill(54,24,76,46,4);
  275.    box1(50,80,80,110,12,14);
  276.    box2(50,140,80,170,13,9);
  277.    circle(65,240,50,1,1,13);
  278.    paint(65,240,4,13);
  279.    line(120,20,190,300,14);
  280.    line(190,20,120,300,12);
  281.    line(155,20,155,300,4);
  282.    line(120,20,120,300,5);
  283.    line(190,20,190,300,15);
  284. }
  285.  
  286. pg3()
  287. {
  288.    atsay(7,05,12,0,  "The following screen will further");
  289.    atsay(8,05,12,0,  "demonstrate the circle function");
  290.    atsay(9,05,12,0,  "and introduce the rotated ellipse");
  291.    atsay(10,05,12,0, "function.  The latter allows the");
  292.    atsay(11,05,12,0, "user to draw an ellipse with a");
  293.    atsay(12,05,12,0, "specified aspect and angle of");
  294.    atsay(13,05,12,0, "rotation.");
  295. }
  296.  
  297. pg5()
  298. {
  299.    turnright(150);
  300.  
  301.    pencolor(14);
  302.  
  303.    forward(50);
  304.  
  305.    delay(300);
  306.    turnright(120);
  307.    forward(50);
  308.    delay(300);
  309.    turnright(120);
  310.    forward(100);
  311.    delay(300);
  312.    turnleft(120);
  313.    forward(50);
  314.    delay(300);
  315.    turnleft(120);
  316.    forward(50);
  317.  
  318.    turnright(180);
  319.    forward(50);
  320.  
  321.    pencolor(0);
  322.  
  323.    forward(50);
  324.    turnright(120);
  325.    pencolor(14);
  326.    delay(300);
  327.    forward(100);
  328.    turnright(60);
  329.    delay(300);
  330.    forward(100);
  331.    turnright(60);
  332.    delay(300);
  333.    forward(100);
  334.    turnright(60);
  335.    delay(300);
  336.    forward(100);
  337.    turnright(60);
  338.    delay(300);
  339.    forward(100);
  340.    turnright(60);
  341.    delay(300);
  342.    forward(97);
  343.  
  344.    turnright(72);
  345.    forward(5);
  346.  
  347.    pencolor(0);
  348.  
  349.    forward(48);
  350.    turnright(96);
  351.  
  352.    turnleft(72);
  353.    pencolor(4);
  354.    forward(90);
  355.    turnright(72);
  356.    forward(90);
  357.    turnright(72);
  358.    forward(90);
  359.    turnright(72);
  360.    forward(90);
  361.    turnright(73);
  362.    forward(90);
  363.    pencolor(0);
  364.  
  365.    paint(90,160,4,14);
  366.    paint(110,160,4,14);
  367.  
  368.  
  369.    paint(40,160,15,4);
  370.    paint(182,160,14,15);
  371.  
  372.  }
  373.  
  374.  
  375.  
  376.  
  377. pg6()
  378. {
  379.    int i;
  380.    sm(9);
  381.    backclr(0);
  382.    for(i=0;i<=150;i++)
  383.       point(rand()/165,rand()/103,rand()/2048);
  384.  
  385.    line(180,0,180,319,1);        /* grass line */
  386.    paint(183,10,2,1);            /*   grass */
  387.    line(150,50,120,110,1);
  388.    line(120,110,152,160,1);
  389.  
  390.    line(140,70,180,70,1);
  391.    line(140,140,180,140,1);
  392.    line(180,70,180,140,1);
  393.  
  394.    line(160,80,180,80,1);
  395.    line(160,95,180,95,1);
  396.    line(160,80,160,95,1);
  397.  
  398.  
  399.    line(150,110,170,110,1);       /* Window */
  400.    line(150,120,170,120,1);
  401.    line(150,130,170,130,1);
  402.    line(150,110,150,130,1);
  403.    line(160,110,160,130,1);
  404.    line(170,110,170,130,1);
  405.    paint(155,115,14,1);             /* color the widow panes */
  406.    paint(155,125,14,1);
  407.    paint(165,115,14,1);
  408.    paint(165,125,14,1);
  409.    paint(130,110,3,1);            /* color the house  */
  410.  
  411.    line(130,100,130,120,11);       /* lines in the house */
  412.    line(161,75,161,79,11);
  413.    line(155,86,155,97,11);
  414.    line(165,100,165,107,11);
  415.    line(161,72,161,78,11);
  416.    line(142,70,142,93,11);
  417.    line(147,100,147,116,11);
  418.  
  419.    paint(170,90,6,1);             /*  color the door   */
  420.    circle(170,90,2,1,1,8);        /*    knob           */
  421.    paint(170,90,8,8);             /*   fill it         */
  422.    line(114,124,128,124,4);       /*   chimney         */
  423.    line(114,136,136,136,4);
  424.    line(114,124,114,136,4);
  425.    line(128,124,136,136,4);
  426.    paint(120,130,4,4);            /*  fill chimney       */
  427.    line(116,125,116,135,8);       /*  horizontal bricks  */
  428.    line(118,125,118,135,8);
  429.    line(120,125,120,135,8);
  430.    line(122,125,122,135,8);
  431.    line(124,125,124,135,8);
  432.    line(126,125,126,135,8);
  433.    line(128,125,128,135,8);
  434.    line(130,128,130,135,8);
  435.    line(132,132,132,135,8);
  436.    line(134,134,134,135,8);
  437.  
  438.    line(116,130,118,130,8);       /*  vertical bricks */
  439.    line(118,133,120,133,8);
  440.    line(118,127,120,127,8);
  441.    line(120,130,122,130,8);
  442.    line(122,127,124,127,8);
  443.    line(122,133,124,133,8);
  444.    line(124,130,126,130,8);
  445.    line(126,127,128,127,8);
  446.    line(126,133,128,133,8);
  447.  
  448.    line(128,130,130,130,8);
  449.    line(130,133,132,133,8);
  450.  
  451.    line(132,130,134,130,8);
  452.  
  453.    boxfill(140,190,180,210,6);      /*  Tree Trunk   */
  454.    line(168,190,172,188,6);
  455.    line(172,188,180,177,6);
  456.    line(168,210,172,212,6);
  457.    line(172,212,180,223,6);
  458.    line(180,177,180,223,6);         /*  base line of tree  */
  459.    paint(178,185,6,6);              /*  paint the tree     */
  460.    paint(178,215,6,6);
  461.  
  462.    line(174,190,178,183,8);        /*   root lines in tree */
  463.    line(172,212,178,213,8);
  464.    line(174,198,178,190,8);
  465.    line(176,203,178,207,8);
  466.    circle(150,190,3,3,1,6);
  467.    paint(150,189,6,6);
  468.    circle(160,210,3,1,3,6);
  469.    paint(160,211,6,6);
  470.    point(168,205,8);
  471.    point(171,203,8);
  472.    point(168,193,8);
  473.    point(172,195,8);
  474.  
  475.    circle(135,216,10,1,2,2);
  476.    paint(135,216,2,2);
  477.    circle(105,180,9,1,1,2);
  478.    paint(105,180,2,2);
  479.    circle(128,180,9,1,3,2);
  480.    paint(128,180,2,2);
  481.    circle(125,228,5,1,2,2);
  482.    paint(125,228,2,2);
  483.    circle(104,200,10,1,3,2);
  484.    paint(104,200,2,2);
  485.  
  486.    circle(117,200,30,3,5,2);
  487.    paint(116,200,2,2);
  488.    line(110,190,117,200,10);
  489.    line(120,180,128,197,10);
  490.  
  491.  
  492.  
  493.  
  494.    circle(74,100,10,1,1,8);       /*   cloud  */
  495.    paint(74,100,8,8);
  496.    circle(62,130,12,1,2,8);
  497.    paint(62,130,8,8);
  498.    circle(72,70,9,1,2,8);
  499.    paint(72,70,8,8);
  500.    circle(32,58,8,1,2,8);
  501.    paint(32,58,8,8);
  502.    circle(20,68,22,1,2,8);
  503.    paint(20,68,8,8);
  504.    circle(35,130,12,1,2,8);
  505.    paint(35,130,8,8);
  506.    circle(21,95,10,1,2,8);
  507.    paint(21,95,8,8);
  508.    circle(33,125,7,1,2,8);
  509.    paint(33,125,8,8);
  510.  
  511.    circle(50,100,41,3,7,8);            /*   cloud  */
  512.    paint(50,100,8,8);               /*  fill it */
  513.  
  514.  
  515.    line(150,194,167,194,8);
  516.    line(142,197,153,197,8);
  517.    line(165,195,174,195,8);
  518.    line(147,200,153,200,8);
  519.    line(150,205,164,205,8);
  520.    line(153,201,164,201,8);
  521.    line(163,202,172,202,8);
  522.  
  523.  
  524.    circle(50,270,15,1,1,7);      /*  moon */
  525.    paint(50,270,7,7);            /*  fill it  */
  526.    point(52,273,8);
  527.    point(43,260,8);
  528.    point(52,262,8);
  529.    point(53,262,8);
  530.    point(52,261,8);
  531.    point(53,273,8);
  532.    point(40,270,8);
  533.    point(60,268,8);
  534.    point(45,281,8);
  535.    point(45,282,8);
  536.    point(44,281,8);
  537.    point(44,272,15);
  538.    point(43,272,15);
  539.    point(43,271,15);
  540.    point(47,265,15);
  541.    point(46,265,15);
  542.    point(46,264,15);
  543.    point(53,272,15);
  544.    point(54,276,15);
  545.  
  546.    delay(2000);
  547.  
  548.  
  549.  
  550. }
  551.  
  552. pg7()
  553. {
  554.    hollow('F',15,100,14);
  555.    hollow('O',15,120,14);
  556.    hollow('N',15,140,14);
  557.    hollow('T',15,160,14);
  558.    hollow('S',15,180,14);
  559.  
  560.    printf("Many different fonts possible");
  561.    usrfont('T',80,60,2,2,4,0);
  562.    usrfont('H',80,80,2,2,4,0);
  563.    usrfont('I',80,100,2,2,4,0);
  564.    usrfont('N',80,120,2,2,4,0);
  565.    usrfont('L',88,140,1,1,4,0);
  566.    usrfont('E',88,150,1,1,4,0);
  567.    usrfont('T',88,160,1,1,4,0);
  568.    usrfont('T',88,170,1,1,4,0);
  569.    usrfont('E',88,180,1,1,4,0);
  570.    usrfont('R',88,190,1,1,4,0);
  571.    usrfont('S',88,200,1,1,4,0);
  572.  
  573.    usrfont('S',135,146,1,1,14,1);
  574.    usrfont('U',135,152,1,1,14,1);
  575.    usrfont('B',135,158,1,1,14,1);
  576.    usrfont('/',130,164,1,1,14,0);
  577.    usrfont('S',127,174,1,1,14,1);
  578.    usrfont('U',127,180,1,1,14,1);
  579.    usrfont('P',127,186,1,1,14,1);
  580.    usrfont('E',127,192,1,1,14,1);
  581.    usrfont('R',127,198,1,1,14,1);
  582.    usrfont('S',130,209,1,1,14,0);
  583.    usrfont('C',130,219,1,1,14,0);
  584.    usrfont('R',130,229,1,1,14,0);
  585.    usrfont('I',130,239,1,1,14,0);
  586.    usrfont('P',130,249,1,1,14,0);
  587.    usrfont('T',130,259,1,1,14,0);
  588.    usrfont('S',130,269,1,1,14,0);
  589.  
  590.  
  591.  
  592.    usrfont('X',175,65,3,3,14,0);
  593.    usrfont('2',175,97,2,2,14,1);
  594.    usrfont('+',175,105,3,3,14,0);
  595.    usrfont('X',175,134,3,3,14,0);
  596.    usrfont('-',175,160,3,3,14,0);
  597.    usrfont('4',175,185,3,3,14,0);
  598.    usrfont('=',175,210,3,3,14,0);
  599.    usrfont('0',175,230,3,3,14,0);
  600.  
  601. }
  602.  
  603. pg8()
  604. {
  605.    printf("   Below are a few Unit Conversions\n\n\n\n\n");
  606.    
  607.    printf("%8.6f inches    = %f cm\n",4.0, INCH_CM(4.0));
  608.    printf("%8.6f cm       = %f inches\n",10.0, CM_INCH(10.0));
  609.    printf("%8.6f degrees  = %f radians\n",90.0, DEG_RAD(90.0));
  610.    printf("%8.6f radians   = %f degrees\n",1.0, RAD_DEG(1.0));
  611.    printf("%8.6f ounces    = %f grams\n",4.0, OZ_GM(4.0));
  612.    printf("%8.6f grams    = %f ounces\n",50.0, GM_OZ(50.0));
  613.    printf("%8.6f gallons  = %f liters\n",10.0, GAL_LT(10.0));
  614.    printf("%8.6f liters   = %f gallons\n",50.0, LT_GAL(50.0));
  615.    printf("%8.6f pounds    = %f kilograms\n",4.0, LB_KG(4.0));
  616.    printf("%8.6f kilogram = %f pounds\n",50.0, KG_LB(50.0));
  617.      
  618.  
  619. }
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626. pgf()
  627. {
  628.    int start = 9;
  629.    gothic('U',10,start+0,14);
  630.    gothic('n',10,start+25,14);
  631.    gothic('i',10,start+45, 14);
  632.    gothic('c',10,start+60, 14);
  633.    gothic('o', 10,start+80,14);
  634.    gothic('r',10,start+100,14);
  635.    gothic('n',10,start+120,14);
  636.  
  637.    gothic('S',10,start+150,14);
  638.    gothic('o',10,start+170,14);
  639.    gothic('f',10,start+190,14);
  640.    gothic('t',10,start+205,14);
  641.    gothic('w',10,start+220,14);
  642.    gothic('a',10,start+240,14);
  643.    gothic('r',10,start+260,14);
  644.    gothic('e',10,start+280,14);
  645.  
  646.  
  647.    atsay(7,04,14,0, "hopes you have enjoyed seeing");
  648.    atsay(8,04,14,0, "some of the features contained");
  649.    atsay(9,04,14,0, "in the Unicorn library for the");
  650.    atsay(10,04,14,0, "Tandy 1000 16 color medium");
  651.    atsay(11,04,14,0, "resolution mode  (mode 9).");
  652.    atsay(14,04,9,0, "      This Library was");
  653.    atsay(16,04,11,0, "        Developed by");
  654.    atsay(18,04,15,0, "      David A. Miller");
  655.  
  656.    greenslv();
  657.  
  658.    atsay(24,02,7,0, "    Press any key to return to Dos");
  659. }
  660.  
  661.  
  662.  
  663.  
  664. atom()
  665. {
  666.   ellipser(100,160,0,50,25,14);
  667.   ellipser(100,160,0,25,50,12);
  668.   ellipser(100,160,48,50,25,13);
  669.   ellipser(100,160,48,25,50,10);
  670.  
  671.   circle(100,160,70,1,1,1);
  672.   circle(100,160,66,1,1,1);
  673.   paint(100,228,4,1);
  674.   circle(100,160,4,1,1,3);
  675.   paint(100,160,4,3);
  676. }
  677.  
  678.  
  679. cntue()
  680. {
  681.    atsay(15,1,8,0, "Press any");
  682.    atsay(16,2,8,0, "Key to");
  683.    atsay(17,1,8,0, "continue");
  684. }
  685.  
  686.  
  687.  
  688.  
  689. unicorn()
  690. {
  691.    line(66,100,107,156, 15);      /*   horn  */
  692.    line(66,100,113,148, 15);
  693.  
  694.    line(157,170,158,154, 15);
  695.    line(158,154,172,138, 15);
  696.    line(172,138,173,125, 15);
  697.    line(173,125,166,115, 15);
  698.    line(166,115,151,117, 15);
  699.    line(151,117,130,138, 15);
  700.    line(130,138,120,140, 15);
  701.    line(120,140,98,168, 15);     /* this line ends at the ear  */
  702.    line(98,168,85,165 , 15);
  703.    line(85,165,89,172, 15);
  704.    line(89,172,97,180, 15);
  705.    line(97,180,121,224, 15);     /* outline after ear      */
  706.    line(121,224,156,255, 15);
  707.    line(156,255,198,266, 15);    /*  very bottom line  */
  708.  
  709.    line(157,170,170,180, 15);     /* part to left going down  */
  710.    line(170,180,198,180, 15);     /* very bottom line */
  711.  
  712.    line(198,180,198,266,15);      /*   line across base of head  */
  713.    paint(188,182,15,15);           /*   fill in the head!!  */
  714.    paint(111, 148, 15,15);        /*   fill in the horn    */
  715.    line(148,185,157,170, 8);      /* head starting at bottom  */
  716.  
  717.    line(152,130,140,142, 8);     /* in head near mouth    */
  718.    line(140,142,133,156, 8);
  719.  
  720.    line(103,167,123,173,8);     /* between ear and eye   */
  721.  
  722.    line(173,125,160,138,8);       /*  mouth   */
  723.  
  724.    line(167,145, 181,151,15);       /*  goatee   */
  725.    line(181,151,175,141,15);
  726.    line(175,141,183,139,15);
  727.    line(183,139,173,133,15);
  728.    line(133,173,145,167,15);
  729.    paint(172,141,15,15);             /*  color the goatee  */
  730.  
  731.    line(102,149,107,142, 8);       /* lines across the horn   */
  732.    line(97,140, 100,135, 8);
  733.    line(91,134,94,130, 8);
  734.    line(86,127,88,122, 8);
  735.    line(81,121,83,119, 8);
  736.    line(76,113,77,111, 8);
  737.  
  738.    line(98,180,140,182,8);        /*  mane     */
  739.    line(106,160,118,168,8);
  740.    line(140,182,149,198,8);
  741.    line(130,205,170,208,8);
  742.    line(170,208,180,220,8);
  743.    line(154,232,190,235,8);
  744.    line(190,235,194,245,8);
  745.  
  746.    ellipser(122,158,42,7,3,8);
  747.    paint(122,158,8,8);
  748.    ellipser(156,123,72,4,2,8);
  749.    paint(156,123,8,8);
  750.  
  751.    circle(123,157,2,1,1,9);
  752.    paint(123,157,9,9);
  753.    point(123,157,7);
  754. }
  755.  
  756.  
  757.  
  758.  
  759. victory()
  760. {
  761.   playibm(7,3,320);
  762.   playibm(1,4,320);
  763.   playibm(4,4,320);
  764.   playibm(7,4,480);
  765.   playibm(7,4,160);
  766.   playibm(7,4,320);
  767.   playibm(4,4,480);
  768.   playibm(4,4,160);
  769.   playibm(4,4,320);
  770.   playibm(12,3,320);
  771.   playibm(4,4,320);
  772.   playibm(12,3,320);
  773.   playibm(7,3,960);
  774. }
  775.  
  776.  
  777.  
  778. greenslv()
  779. {
  780.    playibm(6,3,400);
  781.  
  782. /* 1 */
  783.    playibm(9,3,800);
  784.    playibm(11,3,400);
  785.  
  786. /* 2 */
  787.    playibm(1,4,500);
  788.    playibm(3,4,300);
  789.    playibm(1,4,400);
  790.  
  791. /* 3 */
  792.    playibm(11,3,800);
  793.    playibm(8,3,400);
  794.  
  795. /* 4 */
  796.    playibm(4,3,500);
  797.    playibm(6,3,300);
  798.    playibm(8,3,400);
  799.  
  800. /* 5 */
  801.    playibm(9,3,800);
  802.    playibm(6,3,400);
  803.  
  804. /* 6 */
  805.    playibm(6,3,500);
  806.    playibm(5,3,300);
  807.    playibm(6,3,400);
  808.  
  809. /* 7 */
  810.    playibm(8,3,800);
  811.    playibm(5,3,400);
  812.  
  813. /* 8 */
  814.    playibm(1,3,800);
  815.    playibm(6,3,400);
  816.  
  817. /* 9 */
  818.    playibm(9,3,800);
  819.    playibm(11,3,400);
  820.  
  821. /* 10 */
  822.    playibm(1,4,500);
  823.    playibm(3,4,300);
  824.    playibm(1,4,400);
  825.  
  826. /* 11 */
  827.    playibm(11,3,800);
  828.    playibm(8,3,400);
  829.  
  830. /* 12 */
  831.    playibm(4,3,500);
  832.    playibm(6,3,300);
  833.    playibm(8,3,400);
  834.  
  835. /* 13 */
  836.    playibm(9,3,500);
  837.    playibm(8,3,300);
  838.    playibm(6,3,400);
  839.  
  840. /* 14 */
  841.    playibm(5,3,400);
  842.    playibm(3,3,400);
  843.    playibm(5,3,400);
  844.  
  845. /* 15 */
  846.    playibm(6,3,1200);
  847.    playibm(1,1,1);
  848. /* 16 */
  849.    playibm(6,3,1200);
  850.  
  851. /* 17 */
  852.    playibm(4,4,800);
  853.    playibm(1,1,1);
  854.  
  855. /* 18 */
  856.    playibm(4,4,400);
  857.    playibm(3,4,400);
  858.    playibm(1,4,400);
  859.  
  860. /* 19 */
  861.    playibm(11,3,800);
  862.    playibm(8,3,400);
  863.  
  864. /* 20 */
  865.    playibm(4,3,500);
  866.    playibm(6,3,300);
  867.    playibm(8,3,400);
  868.  
  869. /* 21 */
  870.    playibm(9,3,800);
  871.    playibm(6,3,400);
  872.  
  873. /* 22 */
  874.    playibm(6,3,400);
  875.    playibm(5,3,400);
  876.    playibm(6,3,400);
  877.  
  878. /* 23 */
  879.    playibm(8,3,800);
  880.    playibm(5,3,400);
  881.  
  882. /* 24 */
  883.    playibm(1,3,1600);
  884.    playibm(1,1,1);
  885.  
  886. /* 25 */
  887.    playibm(4,4,1600);
  888.    playibm(1,1,1);
  889.  
  890. /* 26 */
  891.    playibm(4,4,400);
  892.    playibm(3,4,400);
  893.    playibm(1,4,400);
  894.  
  895. /* 27 */
  896.    playibm(11,3,800);
  897.    playibm(8,3,400);
  898.    playibm(1,1,1);
  899.  
  900. /* 28 */
  901.    playibm(4,3,500);
  902.    playibm(6,3,300);
  903.    playibm(8,3,400);
  904.  
  905. /* 29 */
  906.    playibm(9,3,500);
  907.    playibm(8,3,300);
  908.    playibm(6,3,400);
  909.  
  910. /* 30 */
  911.    playibm(5,3,400);
  912.    playibm(3,3,400);
  913.    playibm(5,3,400);
  914.  
  915. /* 31 */
  916.    playibm(6,3,1600);
  917.    playibm(1,1,1);
  918.  
  919. /* 32 */
  920.    playibm(6,3,1200);
  921. }
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.